package com.czxy.changgou4.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.czxy.changgou4.pojo.SpecificationOption;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Mapper
public interface SpecOptionMapper extends BaseMapper<SpecificationOption> {

    /**
     * 查找指定规格的所有规格选项
     * @param specId
     * @return
     */
    @Select("SELECT * FROM tb_specification_option WHERE spec_id = #{specId}")
    public List<SpecificationOption> selectAllBySpecId(@Param("specId") Integer specId);
}
